package ems.dev.easycode.common;

/**
 * @author 狠穿
 * @version 1.0.0
 * @date 2023/5/25
 * @function freemarker实体类对象
 */
public class FreemarkerEntity {

    private String templateDir = "/templates/";
    private String templateName;
    private Object dataSource;
    private String outputPath;
    private String outputName;

    public String getTemplateDir() {
        return templateDir;
    }

    public void setTemplateDir(String templateDir) {
        this.templateDir = templateDir;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public Object getDataSource() {
        return dataSource;
    }

    public void setDataSource(Object dataSource) {
        this.dataSource = dataSource;
    }

    public String getOutputPath() {
        return outputPath;
    }

    public void setOutputPath(String outputPath) {
        this.outputPath = outputPath;
    }

    public String getOutputName() {
        return outputName;
    }

    public void setOutputName(String outputName) {
        this.outputName = outputName;
    }

    public FreemarkerEntity(String templateName, Object dataSource, String outputPath, String outputName) {
        this.templateName = templateName;
        this.dataSource = dataSource;
        this.outputPath = outputPath;
        this.outputName = outputName;
    }

    public FreemarkerEntity() {
    }

    public FreemarkerEntity from(String templateName, String dataSource, String outputPath, String outputName){
        return new FreemarkerEntity(templateName,dataSource,outputPath,outputName);
    }
}
